export default {
  namespaced: true,
  state: {
    fileText:[],
  },
  mutations: {
    updateText (state, data) {
      state.fileText[data.file.parentId+"/"+data.file.name] = data;
    },
    removeText (state, data) {
      if(state.fileText[data.file.parentId+"/"+data.file.name]) delete state.fileText[data.file.parentId+"/"+data.file.name];
    },
    getText(state,data) {
      if(state.fileText[data.file.parentId+"/"+data.file.name]) return state.fileText[data.file.parentId+"/"+data.file.name];
    }
  }
}
